<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>计算器</title>
	</head>
	<script src="js/jquery-3.6.0.min.js"></script>
	<script>
		$(function() {
			$("button").click(function() {
				var a = parseInt($("#add1").val());
				var b = parseInt($("#add2").val());
				var flag = $("#flag").val();
				if (flag == "+") {
					$("#fu").val(a + b);
				} else if (flag == "-") {
					$("#fu").val(a - b);
				} else if (flag == "*") {
					$("#fu").val(a * b);
				} else if (flag == "/") {
					$("#fu").val(n1 / n2);
				}
			});
		});
	</script>
	<body>
		<input id="add1">
		<select id="flag">
			<option value="+">+</option>
			<option value="-">-</option>
			<option value="*">*</option>
			<option value="/">/</option>
		</select>
		<input id="add2">
		<button id="btn1">=</button>
		<input id="fu">
	</body>
</html>
